<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>小米商城-个人中心</title>
		<link rel="icon" href="//s01.mifile.cn/favicon.ico"/>
		<link rel="stylesheet" type="text/css" href="css/style.css">
		<script src="js/axios.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="js/vue.js" ></script>
		<script type="text/javascript" src="js/axios.min.js" ></script>
		<script type="text/javascript" src="js/jquery-3.3.1.min.js" ></script>
		<script type="text/javascript" src="js/config.js" ></script>
		<script type="text/javascript" src="js/web.js" ></script>
	</head>
	<body>
		<div id="app">
	<!-- start header -->
		<header>
			<div class="top center">
				<div class="left fl">
					<ul>
						<li><a href="index.html" target="_blank">小米商城</a></li>
						<li>|</li>
						<li><a href="">MIUI</a></li>
						<li>|</li>
						<li><a href="">米聊</a></li>
						<li>|</li>
						<li><a href="">游戏</a></li>
						<li>|</li>
						<li><a href="">多看阅读</a></li>
						<li>|</li>
						<li><a href="">云服务</a></li>
						<li>|</li>
						<li><a href="">金融</a></li>
						<li>|</li>
						<li><a href="">小米商城移动版</a></li>
						<li>|</li>
						<li><a href="">问题反馈</a></li>
						<li>|</li>
						<li><a href="">Select Region</a></li>
						<div class="clear"></div>
					</ul>
				</div>
				<div class="right fr">
					<div class="gouwuche fr"><a href="gouwuche.html">购物车</a></div>
					<div class="fr">
						<ul>
							<li><a style="cursor:pointer" v-on:click="jump()" target="_blank">{{omg}}</a></li>
							<li>|</li>
							<li><a href="./register.html" target="_blank" >注册</a></li>
							<li>|</li>
							<li><a href="#top">个人中心</a></li>
						</ul>
					</div>
					<div class="clear"></div>
				</div>
				<div class="clear"></div>
			</div>
		</header>
	<!--end header -->
	<!-- start banner_x -->
		<div class="banner_x center">
			<a href="./index.html" target="_blank"><div class="logo fl"></div></a>
			<a href=""><div class="ad_top fl"></div></a>
			<div class="nav fl">
				<ul>
					<li v-on:click="search()"><a href="#">全部商品</a></li>
					<li v-on:click="go('小米手机')"><a href="liebiao.html" >小米手机</a></li>
					<li v-on:click="go('红米手机')"><a href="liebiao.html" >红米手机</a></li>
					<li v-on:click="go('笔记本电脑')"><a href="liebiao.html" >笔记本电脑</a></li>
					<li v-on:click="go('电视')"><a href="liebiao.html" >电视</a></li>
					<li v-on:click="go('路由器')"><a href="liebiao.html" >路由器</a></li>
					<li v-on:click="go('智能硬件')"><a href="liebiao.html" >智能硬件</a></li>
				</ul>
			</div>
			<div class="search fr">
				<form action="" method="post">
					<div class="text fl">
						<input type="text" class="shuru"  placeholder="小米6&nbsp;小米MIX现货">
					</div>
					<div class="submit fl">
						<input type="submit" class="sousuo" value="搜索"/>
					</div>
					<div class="clear"></div>
				</form>
				<div class="clear"></div>
			</div>
		</div>
		<div id="na022">
					<div id="na0221"><img src="image/a.png"></div>
					<div id="na0222"> <a>已成功加入购物车！</a></div>
				<div id="na023">
					<!--<div id="d021512"><div style="margin-left: 110px; margin-top: 9px;">亮黑色</div></div>
						<div id="d021513"><div style="margin-left: 110px; margin-top: 9px;">亮蓝色</div></div>
				</div>-->
				<div id="na0231"><div style="height: 10px;"></div><a style=" margin-left: 20px;text-decoration:none;" href="index.html">返回上一级</a></div>
				</div>
				<div id="na0232"><div style="height: 10px;"></div><a style=" margin-left: 20px; text-decoration:none; color: white;" href="gouwuche.html" >去购物车结算</a></div>
				</div>
		<div class="danpin center">			
			<div class="biaoti center" >购买此商品的顾客还购买了</div>
			<!--小米8se横图-->
			<div class="main center" style="margin-top: 30px;">
				<!--查出销量最高的前五名-->
				<div class="mingxing fl" v-for="p in list">
					<div class="sub_mingxing" ><a v-on:click="goSale(p.productCode)" href="xiangqing.html" ><img v-bind:src="photourl+p.productPhoto" alt=""></a></div>
						<div class="pinpai" ><a v-on:click="goSale(p.productCode)" href="xiangqing.html" >{{p.productName}}</a></div>
						<div class="youhui">{{p.productComment}}</div>
						<div class="jiage">{{p.productPrice}}元</div>						
				</div>				
				<div class="clear"></div>
			</div>
		</div>
		</div>
		<footer class="mt20 center">			
			<div class="mt20">MIUI|米聊|多看书城|小米路由器|视频电话|小米天猫店|小米淘宝直营店|小米网盟|小米移动|隐私政策|Select Region</div>
			<div>©mi.com 京ICP证110507号 京ICP备10046444号 京公网安备11010802020134号 京网文[2014]0059-0009号</div> 
			<div>违法和不良信息举报电话：151-3503-4757，本网站所列数据，除特殊说明，所有数据均出自昭平科技实验室测试</div>
		</footer>
		</div>
	</body>
	<script type=" text/javascript">
		var vue=new Vue({			
			el:"#app",
			data:{
				list:[],
				photourl:window.web_server_static,
				page:"1",
				pagesize:"5",
				uuu:window.sessionStorage.getItem('loginUsername'),
				omg:'',
			},
			created:function(){
				this.saleCountNum(),
				this.dengl()
			},			
			methods:{
				dengl:function(){
//						var uuu=window.sessionStorage.getItem('loginUsername');
						if(this.uuu==null){
							this.omg="登录";														
						}else{
							this.omg=this.uuu;
						}													
					},
					jump:function(){
					if(this.uuu!=null){
						window.location.href="self_info.html";
					}else{
						window.location.href="login.html";
					}
				},
				saleCountNum:function(){					
					var self=this;										
					//取出搜索框存的用户写的搜索值
					self.name=name
					var params=new URLSearchParams();
					params.append("productname","");
					params.append("page",self.page);
					params.append("pagesize",self.pagesize);
					//必须要写
					axios.defaults.withCredentials = true;
					axios.post(window.web_server+"api/product/fuzzysalecount",params)
					.then(function(res){
						var object=res.data;
						if(object.status==200){
							self.list=object.data.list;
							//alert("a")
						}
					})
				},
				goSale:function(code){
					window.sessionStorage.setItem("code",code);
				},
			}	
		})
	</script>	

</html>